#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    player = new QMediaPlayer;
    videoWidget = new QVideoWidget;
    player->setVideoOutput(videoWidget);
    player->setSource(QUrl::fromLocalFile("../012_media_play/h264aac_1s.mp4"));
    videoWidget->show();
    player->play();
}

Widget::~Widget()
{
    delete ui;
}

